<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<link rel="stylesheet" type="text/css" href="template/css.css"
		media="all" />
	<title>QueroTeto</title>
</h:head>
<h:body>
	<div id="corpo">
		<ui:include src="/template/topo.xhtml" />
		<ui:include src="/template/menu.xhtml" />
		<div id="slide">
		</div>
		<div id="conteudo">
			<div id="centro">
			
			#{contatoBean.msg}
			
				<h:form id="faleConosco">
					<p:panel header="Fale Conosco">
						<h:panelGrid columns="3" cellpadding="8">

							<h:outputText value="Seu email:" />
							<p:inputText value="#{contatoBean.origem}" id="email" required="true" requiredMessage="Email é invalido">
							<f:validateRegex
								pattern="^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$" />
							</p:inputText>
							<p:message for="email" display="icon" />  

							<h:outputText value="Assunto:" />
							<p:inputText value="#{contatoBean.assunto}" id="assunto" required="true" requiredMessage="Assunto é um campo obrigatório."/>
							<p:message for="assunto" display="icon" />  	
						
							<h:outputText value="Mensagem:" />
							<p:inputTextarea rows="6" cols="20" value="#{contatoBean.mensagem}" id="mensagem" required="true" requiredMessage="Mensagem é um campo obrigatório."/>
							<p:message for="mensagem" display="icon" />  
							
							<p:commandButton value="Enviar"
								action="#{contatoBean.enviaEmail}" ajax="false" />
						</h:panelGrid>
					</p:panel>
				</h:form>
			</div>

		</div>
		<div id="both" align="center"></div>
		<ui:include src="/template/rodape.xhtml" />
	</div>
</h:body>
</html>